cmake_minimum_required(VERSION 3.16)

project(dataCollection VERSION 0.1 LANGUAGES CXX)

# set(CMAKE_AUTOUIC ON)
# set(CMAKE_AUTOMOC ON)
# set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED)

# 手动设置路径


# 找头文件
pkg_check_modules(PNG REQUIRED libpng)
include_directories(${PNG_INCLUDE_DTRS})

pkg_check_modules(GLOG REQUIRED libglog)
include_directories(${GLOG_INCLUDE_DIRS})

set(Aravis_INCLUDE_DIRS "/usr/local/include/aravis-0.8")
include_directories(${Aravis_INCLUDE_DIRS})

pkg_check_modules(GLIB REQUIRED glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})

pkg_check_modules(GOBJECT REQUIRED gobject-2.0)
include_directories(${GOBJECT_INCLUDE_DIRS})

# 找库
find_library(Aravis_LIBRARIES NAMES aravis-0.8 REQUIRED)
link_directories(${GLOG_LIBRARY_DIRS})
link_directories(${PNG_LIBRARY_DIRS})

# 设置源文件
set(PROJECT_SOURCES
        main.cpp
)


# 添加可执行文件
add_executable(main
    main.cpp
    camera/CameraController.cpp
    system/log
    image/imageIO
)


# 链接
target_link_libraries(main PRIVATE 
    ${Aravis_LIBRARIES}
    ${GLOG_LIBRARIES}
    ${GLIB_LIBRARIES}
    ${GOBJECT_LIBRARIES}
    ${PNG_LIBRARIES}
    pthread
    )
